<template>
	<view>
		<view class="menus">
			<scroll-view class="scroll" scroll-x>
				<rb-menu v-for="(opt, index) in options" class="men"
				:title="opt.title" 
				:m_type="opt.m_type" 
				:selected="index == selectedIndex" 
				:scene_selected="index == scene_selectedIndex" 
				:show_star="opt.show_save"
				:link_status="opt.status"
				@click="mClick(index)"/>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	
	import rbMenu from '@/components/rb-menu/rb-menu.vue'
	
	export default {
		name:"menus",
		components: {
			rbMenu
		},
		props: {
			options: {
				type: Array,
				default: null
			},
			selectedIndex: {
				type: Number,
				default: 0
			},
			scene_selectedIndex: {
				type: Number,
				default: -1
			}
		},
		data() {
			return {
				
			};
		},
		methods: {
			mClick(index) {
				this.$emit('click', index)
			}
		}
	}
</script>

<style scoped>

	.rb-menus {
		display: flex;
		align-items: end;
	}
	
	.men {
		margin-right: 5px;
		display: inline-block;
		 vertical-align: bottom;
	}
	
	.scroll {
		white-space: nowrap;
				width: 100%;
	}
	
	::v-deep ::-webkit-scrollbar {
	  width: 0;                /* 滚动条的宽度 */
	  height: 0;              /* 滚动条的高度 */
	}
	


</style>